import pickle

class People:
    def __init__(self,name):
        self.name = name

    def __str__(self):
        return 'My name is {}'.format(self.name)

p1 = People('王二狗')

print(p1)
res = pickle.dumps(p1)
print(res)

rres = pickle.loads(res)
print(rres)
print(type(rres))

print(p1 is rres)
#       False

# 有一种数据格式，每种编程语言都认识
# json；js 对象符号
#  json 字符串
